import React, { useEffect, useRef } from 'react'
import * as Rcad from '../../../rcad'
export const scenes = new Rcad.Scene();
export default function Cad() {
  const cadRef = useRef(null);
  useEffect(() => {
    const renderer = new Rcad.WebGLRenderer();
    renderer.setSize(400, 400);
    // renderer.setClearColor(0xb9d3ff, 1); //设置背景颜色
    renderer.render(cadRef.current);
  }, [cadRef]);
  return (
    <div id='rcad' ref={cadRef} />
  )
}
